Repository navigation
dashboard: a slow data run can't hold the page's refreshes - #214
Merged
Merged
Conversation
A page has one /api/data read at a time, and the server shares one dashboard-data run across every page for up to 2 minutes. One stuck run on a loaded box stopped every refresh until it was killed: the Node 24 typing tests' "1 polls" timeouts on CI. - The server: a read with last good data to fall back on waits DATA_WAIT_MS (20 s) on the run, then answers with that data, marked stale. The run goes on; a later read has it. - The page: a refresh with data already drawn gives up after 30 s and says so, so the one-at-a-time guard can't hold. The first read still waits as long as the server does. - The tests: the fixture's fetch hook records each data read, and a page wait that times out reports the last reads (a stuck one with its age) and the end of the server's output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- DEVTEAM_DATA_WAIT_MS that is empty, negative or not a number is the default, not 0. - The page reads the body before applying the headers, so a read given up mid-body sets nothing. - An empty dashboard-data output is never kept as the last good data. - The test hook's comment says a gate held past 30 s reads as a read given up; the new test clears DEVTEAM_SUPERVISOR as its neighbours do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Reviewed: a read with last good data waits at most 20 s on the shared dashboard-data run, then gets that data marked |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the dashboard Chrome tests' flakiness on Node 24: "the note typed" and "1 polls" timeouts in kit (24, rest), which hit #203 three times in four and #204 once. They weren't caused by the code: `dashboard-data` takes about 255 ms on the typing fixture on every branch. The cause was a stall that also affects the owner's real dashboard on a loaded box.
Why it stalled. The page runs one `/api/data` read at a time, and its fetch had no timeout. The server shares one `dashboard-data` child across every page and gives it 120 s. One slow or stuck child stopped every refresh for up to 2 minutes, so each 15 s wait in the tests failed in turn.
The fix
Diagnostics. The fixture's fetch hook records each data read. A page wait that times out now reports the last five reads (a stuck one with how long it has been in flight) and the end of the dashboard server's output, so a future failure shows whether the child hung or crawled.
Tests
Review. Fable did an adversarial review. Fixes in the second commit: wait parsing that turned empty or NaN into 0, header state left half-applied after a give-up, empty output treated as good data, the hook comment, and the env scrub. One judgement call is left open: a stale reply has no visual cue on the page beyond the "updated" time. That predates this change; it just happens more often now on a project whose runs take over 20 s.
🤖 Generated with Claude Code